
var Mock = require('mockjs')

//用户信息
module.exports = (req, res) => {
		//query、body = 前端请求传入的参数
		let {userName,passWord}= req.body || req.query;
	  var data = {
		code:0,
	  	message:"ok",
		};
		if(userName == "huanghuisong" && passWord == "123456"){
			data.code = 200;
			data.用户名 = "huanghuisong";
			data.密码 = "123456";
		}else{
			data.code = -101;
			data.message = "请输入正确的用户名与密码";
		}
		console.log(data.用户名,data.密码)
		// data['list|1-10']= [{
  //       // 属性 id 是一个自增数，起始值为 1，每次增 1
  //       "post_num":"@natural(60, 100)",
  //       "post_date":"@date()",
  //   }]

	  res.json(Mock.mock(data))
};
